package com.vhall.component.dao.livecolumn;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vhall.component.entity.livecolumn.entity.LiveColumnUserRelationEntity;
import com.vhall.component.entity.thirduser.ThirdUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author a1111
* @description 针对表【live_column_user_relation(栏目与运营人员关联表)】的数据库操作Mapper
* @createDate 2023-08-11 19:29:46
* @Entity generator.domain.LiveColumnUserRelationEntity
*/
@Mapper
@Repository
public interface LiveColumnUserRelationMapper extends BaseMapper<LiveColumnUserRelationEntity> {
    @Select("SELECT distinct tu.user_code,tu.`name`,tu.org_code,tu.org_name,tu.advisor_license_no,tu.user_type from live_column_user_relation lcur left join third_user tu on tu.user_code=lcur.user_code  where lcur.live_column_id=#{columnId} and tu.user_type=0 ")
    List<ThirdUserVO> listRelationThirdUser(@Param("columnId")Integer columnId);
}




